package com.le.tester.book.concurrentjavafight.l6_3_3;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * createTime：2022/10/20 10:08
 * description：使用future等待图像下载
 */
public class FutureRenderer {
    private final ExecutorService exec = Executors.newCachedThreadPool();

    void renderPage(CharSequence source) {
//        final List<ImageInfo> imageInfo = scanForImageInfo(source);
//
//        Callable<List<ImageData>> task = (Callable<List<ImageData>>) () -> {
//            List<ImageData> result = new ArrayList<>();
//            for (ImageInfo imageInfo1 : imageInfo) {
//                result.add(imageInfo1);
//                return result;
//            }
//        };
//
//        Future<List<ImageData>> future = exec.submit(task);
//        future.get();
    }

}
